/**
 * 速度
 */
var LBMovementSpeed2D   = function (options) {

    this._speed     = options.speed;
    this._direction = options.direction;
    this._rollSpeed = options.rollSpeed;

    if ('number' == typeof options.angle) {

        this._direction = (options.angle * 2 * Math.PI) / 360;
    }
}

LBMovementSpeed2D.prototype.getDirection    = function () {

    return  this._direction;
}

/**
 * 根据时间来获取移动坐标x
 *
 * @param   float   delayTime   时间(秒)
 */
LBMovementSpeed2D.prototype.getDeltaX       = function (delayTime) {

    return  Math.cos(this._direction) * this._speed * delayTime;
}

/**
 * 根据时间来获取移动坐标y
 *
 * @param   float   delayTime   时间(秒)
 */
LBMovementSpeed2D.prototype.getDeltaY       = function (delayTime) {

    return  0 - (Math.sin(this._direction) * this._speed * delayTime);
}

/**
 * 根据时间来获取移动坐标
 *
 * @param   float   delayTime   时间(秒)
 */
LBMovementSpeed2D.prototype.getDeltaDirection       = function (delayTime) {

    return  this._rollSpeed * delayTime;
}